var dbserver = require('../dao/dbserver.js');

//用户搜索
exports.userSearch = function(req, res) {
	let data = req.body.data;

	dbserver.searchUser(data, res);
}

// 判断是否为好友
exports.isFriend = function(req, res) {
	let uid = req.body.uid;
	let fid = req.body.fid;

	dbserver.isFriend(uid, fid, res);
}

//搜索群
exports.searchGroup = function(req, res) {
	let data = req.body.data;
	dbserver.searchGroup(data, res)
}

//是否在群内
exports.isInGroup = function(req, res) {
	let uid = req.body.uid;
	let gid = req.body.gid;

	dbserver.isInGroup(uid, gid, res)
}
